﻿<phone:PhoneApplicationPage
    x:Class="Photonware.RestUI.SL8.Xamls.QRCodePage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="White"
    Background="Black"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d"
    shell:SystemTray.IsVisible="True">

    <!--LayoutRoot 是包含所有页面内容的根网格-->
    <Grid x:Name="LayoutRoot" Background="Black">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--TitlePanel 包含应用程序的名称和页标题-->
        <StackPanel Grid.Row="0" Margin="12,17,0,28">
            <TextBlock Text="rest ui" Style="{StaticResource PhoneTextNormalStyle}" Foreground="White"/>
            <TextBlock Text="Barcode Scan" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle2Style}"/>
        </StackPanel>

        <!--ContentPanel - 在此处放置其他内容-->
        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
            <StackPanel Grid.Column="1" >
                <Image x:Name="BarcodeImage" Width="470" Height="300"/>
                <Rectangle x:Name="previewRect" 
                    Margin="0" 
                    Height="300"
                    Width="300" 
                    HorizontalAlignment="Center" 
                    VerticalAlignment="Center"
                    Visibility="Collapsed">
                    <Rectangle.Fill>
                        <VideoBrush x:Name="previewVideo">
                            <VideoBrush.RelativeTransform>
                                <CompositeTransform  
                        x:Name="previewTransform" CenterX=".5" CenterY=".5" />
                            </VideoBrush.RelativeTransform>
                        </VideoBrush>
                    </Rectangle.Fill>
                </Rectangle>
                <TextBox x:Name="BarcodeContent" Text="Scanning..." FontSize="26" MinHeight="200" TextWrapping="Wrap" Background="Black" Foreground="White" />
                <Button Name="addButton" Content="Get Usercase" IsEnabled="False" Foreground="White" Click="addButton_Click"/>
            </StackPanel>
        </Grid>
    </Grid>

</phone:PhoneApplicationPage>